package com.ferenc.springboot.mybatis.web;

import com.ferenc.springboot.mybatis.dao.TbUserMapper;
import com.ferenc.springboot.mybatis.entity.TbUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TODO
 *
 * @author <a href="mailto:ferenc.zeng@gmail.com">Ferenc Zeng</a>
 * @since 2022/2/27
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private TbUserMapper userMapper;

    @RequestMapping("/findAll")
    public List<TbUser> findAll(){
        return userMapper.selectAll();
    }

}
